package com.cyj.dream.visual.codegen.config;

/**
 * @Description: mybatis-plus配置
 * @BelongsProject: DreamChardonnay
 * @BelongsPackage: com.cyj.dream.visual.codegen.config
 * @Author: ChenYongJia
 * @CreateTime: 2021-09-09 14:34
 * @Email: chen87647213@163.com
 * @Version: 1.0
 */
/*@Configuration
@MapperScan("com.cyj.codegen.mapper")
@EnableTransactionManagement*/
public class MybatisConfig {

    /*@Bean
    public PaginationInterceptor paginationInterceptor() {
        return new PaginationInterceptor();
    }

    @Bean
    public SqlSessionFactory sqlSessionFactory(DataSource dataSource) throws Exception{
        MybatisSqlSessionFactoryBean factory = new MybatisSqlSessionFactoryBean();
        factory.setDataSource(dataSource);
        factory.setTransactionFactory(new SpringManagedTransactionFactory());
        factory.setMapperLocations(new PathMatchingResourcePatternResolver().getResources("classpath:mapper.*.xml"));
        factory.setTypeAliasesPackage("com.cyj.codegen.model");
        return factory.getObject();
    }*/

}
